home *** CD-ROM | disk | FTP | other *** search
- /*
- File: EventCountdown.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #pragma once
-
- #ifndef __EVENTCOUNTDOWN__
- #define __EVENTCOUNTDOWN__ 1
-
- #ifndef __DIRECTOBJECT__
- #include "DirectObject.h"
- #endif
-
- /***********************************|****************************************/
-
- class TEventCountdown : public TDirectObject
- {
- public: TEventCountdown ( );
- TEventCountdown ( unsigned long defaultInterval );
- virtual ~TEventCountdown ( );
-
- virtual Boolean ExpiredYet ( ) const;
-
- virtual Boolean ResetTimer ( );
- virtual Boolean ResetTimer ( unsigned long interval );
-
- virtual unsigned long ExpirationCount ( ) const;
-
- virtual Boolean SetExpiration ( unsigned long expireAtThisTime );
-
- virtual ostream& operator << ( ostream& s );
-
- protected:
- unsigned long fDefaultInterval;
- unsigned long fExpirationAt;
- unsigned long fExpirationCount;
- };
-
- /***********************************|****************************************/
-
- const unsigned long kOneMinuteInSeconds = 60;
- const unsigned long kOneHourInSeconds = 3600;
- const unsigned long kOneDayInSeconds = 3600 * 24;
-
- /***********************************|****************************************/
-
- #endif
-